import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LoginComponent} from './components/login/login.component';
import {RegisterComponent} from './components/register/register.component';
import {ChangePasswordComponent} from './components/change-password/change-password.component';
import {HomeComponent} from './components/home/home.component';
import {SplashComponent} from './components/splash/splash.component';
import {UserComponent} from './components/user/user.component';
import {LinesComponent} from './components/lines/lines.component';
import {SendEmailComponent} from './components/send-email/send-email.component';
import {ChargeComponent} from './components/charge/charge.component';
import {RestPasswordComponent} from './components/rest-password/rest-password.component';
import {BuyTimeComponent} from './components/buy-time/buy-time.component';
import {AppProxyComponent} from './components/app-proxy/app-proxy.component';
import {RouterModeComponent} from './components/router-mode/router-mode.component';


const routes: Routes = [
  {path: 'login', component: LoginComponent},
  {path: 'splash', component: SplashComponent},
  {path: 'register', component: RegisterComponent},
  {path: 'changePwd', component: ChangePasswordComponent},
  {path: 'forget', component: SendEmailComponent},
  {path: 'rest', component: RestPasswordComponent},
  {path: 'home', component: HomeComponent},
  {path: 'user', component: UserComponent},
  {path: 'lines', component: LinesComponent},
  {path: 'charge', component: ChargeComponent},
  {path: 'buy', component: BuyTimeComponent},
  {path: 'app', component: AppProxyComponent},
  {path: 'router', component: RouterModeComponent},
  {path: '**', pathMatch: 'full', redirectTo: 'splash'}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
